<?php 
include '../../init.php';

include DIR_CORE.'mysql.php';

//var_dump($_POST);

//接受数据
$name = $_POST['name'];
$pass = $_POST['password'];
$password = md5($pass);


	//数据入库
	$sql = "update user set password = '$password' where name = '$name'";
	$result = mysqli_query($link,$sql);

	if($result){
		echo '<h2 style="color:green;font-weight:bold;">更改成功</h2>';
	}else{
		echo '<h2 style="color:green;font-weight:red;">更改失败</h2>';
	}

